<?php
namespace app\api\controller;
use think\Controller;
use think\Request;
use think\File;

class Image extends Controller  //api
{
    
	public function upload(){
		$file = Request::instance()->file('file');
		$info = $file->move('upload');
		 //print_r($info);
		if($info && $info->getPathname()){
			  return show(1, 'success', '/'.$info->getPathname());
			}else{
				return show(0, 'upload error');
				}
		
		
		}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
?>